<?php

class videojuego extends object_standard {

    //attributes
    protected $id;
    protected $nombre;
    protected $descripcion;
    protected $objetivo;
    protected $genero;
    protected $modalidad;
    protected $clasificacion;
    protected $gerente;//gerente es empleado
    
	//components
    var $components = array();
    //auxiliars for primary key and for files
    var $auxiliars = array();

    //data about the attributes
    public function metadata() {
        return array("id" => array(), "nombre" => array(), "descripcion" => array(), 
            "objetivo" => array(), "genero" => array(), "modalidad" => array(), "clasificacion" => array(),
            "gerente" => array("foreign_name" => "e_v", "foreign" => "empleado", "foreign_attribute" => "cedula"));
    }

    public function primary_key() {
        return array("id");
    }

    public function relational_keys($class, $rel_name) {
        switch ($class) {
            case "empleado":
               switch ($rel_name) {
                   case "e_v":
                       return array("empleado");
                       break;
               }
               break;

            default:
                break;
        }
    }

}

?>